﻿using System;
using System.Collections.Generic;
using System.Text;
using NetMicro.Core.Exceptions;

namespace NetMicro.HttpClient.Exceptions
{
    public class HttpClientException : ExceptionBase
    {
        private readonly string _message;
        public HttpClientException()
            : this("")
        {
        }
        public HttpClientException(string message)
            : this(message, null)
        {
        }
        public HttpClientException(Exception exception)
            : this("", exception)
        {
        }
        public HttpClientException(string message, Exception exception)
            : this(message, 0, exception)
        {
        }
        public HttpClientException(string message, int code)
           : this(message, code, null)
        {
        }
        public HttpClientException(string message, int code, Exception exception)
            : base(message, code, exception)
        {
            _message = message;
        }
        public override string Message => $"{"HttpClient组件错误"}.{_message}";
    }
}
